use yew::{Callback, Renderer};
use yew::platform::spawn_local;
use crate::db::db::db_create_or_init;
use crate::business::app::App;

mod db;
mod js;
mod global;
mod business;
mod util;


static WEB_SOCKET_URL: &'static str = "http://localhost:9290/imWebsocket";
static TENANT_CODE : &'static str = "0000";

fn main() {
    wasm_logger::init(wasm_logger::Config::default());

    spawn_local(async move {
        log::info!("db init begin");
        let db = db_create_or_init().await;
        log::info!("db init end");
    });

    Renderer::<App>::new().render();
}